﻿@model List<Mondial2014.Controllers.KnockoutGamblesController.KnockoutGambleViewModel>

@{
    ViewBag.Title = "הימורים";
}

<h2>עידכון הימורים עבור @Html.DisplayFor(model => model.First().GamblerName)</h2>

@Html.ActionLink("חזרה לרשימת משתתפים", "Index", "Gamblers")
<br /><br />

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        
        <div class="form-group">
            <input type="submit" value="שמור" class="btn btn-default" />
        </div>

        <table class="table">
            <tr>
                <th>
                    שמינית
                </th>
                <th>
                    רבע
                </th>
                <th>
                    חצי
                </th>
                <th>
                    גמר
                </th>
                <th>
                    זוכה
                </th>
            </tr>
            <tr>
                <td>
                    @for (var index = 0; index < 16; index++)
                    {
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerId", Model[index].GamblerId, new { @readonly = "readonly", @style = "display:none" })
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerName", Model[index].GamblerName, new { @readonly = "readonly", @style = "display:none" })
                        @Html.DropDownList("knockoutGambleViewModels[" + @index + "].TeamId", new[] { new SelectListItem { Text = "ברזיל", Value = "1", Selected = (1 == Model[index].TeamId) }, new SelectListItem { Text = "קרואטיה", Value = "2", Selected = (2 == Model[index].TeamId) }, new SelectListItem { Text = "מקסיקו", Value = "3", Selected = (3 == Model[index].TeamId) }, new SelectListItem { Text = "קמרון", Value = "4", Selected = (4 == Model[index].TeamId) }, new SelectListItem { Text = "ספרד", Value = "5", Selected = (5 == Model[index].TeamId) }, new SelectListItem { Text = "הולנד", Value = "6", Selected = (6 == Model[index].TeamId) }, new SelectListItem { Text = "צ'ילה", Value = "7", Selected = (7 == Model[index].TeamId) }, new SelectListItem { Text = "אוסטרליה", Value = "8", Selected = (8 == Model[index].TeamId) }, new SelectListItem { Text = "קולומביה", Value = "9", Selected = (9 == Model[index].TeamId) }, new SelectListItem { Text = "יוון", Value = "10", Selected = (10 == Model[index].TeamId) }, new SelectListItem { Text = "חוף השנהב", Value = "11", Selected = (11 == Model[index].TeamId) }, new SelectListItem { Text = "יפן", Value = "12", Selected = (12 == Model[index].TeamId) }, new SelectListItem { Text = "אורוגוואי", Value = "13", Selected = (13 == Model[index].TeamId) }, new SelectListItem { Text = "קוסטה ריקה", Value = "14", Selected = (14 == Model[index].TeamId) }, new SelectListItem { Text = "אנגליה", Value = "15", Selected = (15 == Model[index].TeamId) }, new SelectListItem { Text = "איטליה", Value = "16", Selected = (16 == Model[index].TeamId) }, new SelectListItem { Text = "שוויץ", Value = "17", Selected = (17 == Model[index].TeamId) }, new SelectListItem { Text = "אקוודור", Value = "18", Selected = (18 == Model[index].TeamId) }, new SelectListItem { Text = "צרפת", Value = "19", Selected = (19 == Model[index].TeamId) }, new SelectListItem { Text = "הונדורס", Value = "20", Selected = (20 == Model[index].TeamId) }, new SelectListItem { Text = "ארגנטינה", Value = "21", Selected = (21 == Model[index].TeamId) }, new SelectListItem { Text = "בוסניה", Value = "22", Selected = (22 == Model[index].TeamId) }, new SelectListItem { Text = "איראן", Value = "23", Selected = (23 == Model[index].TeamId) }, new SelectListItem { Text = "ניגריה", Value = "24", Selected = (24 == Model[index].TeamId) }, new SelectListItem { Text = "גרמניה", Value = "25", Selected = (25 == Model[index].TeamId) }, new SelectListItem { Text = "פורטוגל", Value = "26", Selected = (26 == Model[index].TeamId) }, new SelectListItem { Text = "ארהב", Value = "27", Selected = (27 == Model[index].TeamId) }, new SelectListItem { Text = "גאנה", Value = "28", Selected = (28 == Model[index].TeamId) }, new SelectListItem { Text = "בלגיה", Value = "29", Selected = (29 == Model[index].TeamId) }, new SelectListItem { Text = "אלג'יריה", Value = "30", Selected = (30 == Model[index].TeamId) }, new SelectListItem { Text = "רוסיה", Value = "31", Selected = (31 == Model[index].TeamId) }, new SelectListItem { Text = "קוריאה", Value = "32", Selected = (32 == Model[index].TeamId) } })
                        <br/><br/>
                    }
                </td>
                <td>
                    @for (var index = 16; index < 24; index++)
                    {
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerId", Model[index].GamblerId, new { @readonly = "readonly", @style = "display:none" })
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerName", Model[index].GamblerName, new { @readonly = "readonly", @style = "display:none" })
                        @Html.DropDownList("knockoutGambleViewModels[" + @index + "].TeamId", new[] { new SelectListItem { Text = "ברזיל", Value = "1", Selected = (1 == Model[index].TeamId) }, new SelectListItem { Text = "קרואטיה", Value = "2", Selected = (2 == Model[index].TeamId) }, new SelectListItem { Text = "מקסיקו", Value = "3", Selected = (3 == Model[index].TeamId) }, new SelectListItem { Text = "קמרון", Value = "4", Selected = (4 == Model[index].TeamId) }, new SelectListItem { Text = "ספרד", Value = "5", Selected = (5 == Model[index].TeamId) }, new SelectListItem { Text = "הולנד", Value = "6", Selected = (6 == Model[index].TeamId) }, new SelectListItem { Text = "צ'ילה", Value = "7", Selected = (7 == Model[index].TeamId) }, new SelectListItem { Text = "אוסטרליה", Value = "8", Selected = (8 == Model[index].TeamId) }, new SelectListItem { Text = "קולומביה", Value = "9", Selected = (9 == Model[index].TeamId) }, new SelectListItem { Text = "יוון", Value = "10", Selected = (10 == Model[index].TeamId) }, new SelectListItem { Text = "חוף השנהב", Value = "11", Selected = (11 == Model[index].TeamId) }, new SelectListItem { Text = "יפן", Value = "12", Selected = (12 == Model[index].TeamId) }, new SelectListItem { Text = "אורוגוואי", Value = "13", Selected = (13 == Model[index].TeamId) }, new SelectListItem { Text = "קוסטה ריקה", Value = "14", Selected = (14 == Model[index].TeamId) }, new SelectListItem { Text = "אנגליה", Value = "15", Selected = (15 == Model[index].TeamId) }, new SelectListItem { Text = "איטליה", Value = "16", Selected = (16 == Model[index].TeamId) }, new SelectListItem { Text = "שוויץ", Value = "17", Selected = (17 == Model[index].TeamId) }, new SelectListItem { Text = "אקוודור", Value = "18", Selected = (18 == Model[index].TeamId) }, new SelectListItem { Text = "צרפת", Value = "19", Selected = (19 == Model[index].TeamId) }, new SelectListItem { Text = "הונדורס", Value = "20", Selected = (20 == Model[index].TeamId) }, new SelectListItem { Text = "ארגנטינה", Value = "21", Selected = (21 == Model[index].TeamId) }, new SelectListItem { Text = "בוסניה", Value = "22", Selected = (22 == Model[index].TeamId) }, new SelectListItem { Text = "איראן", Value = "23", Selected = (23 == Model[index].TeamId) }, new SelectListItem { Text = "ניגריה", Value = "24", Selected = (24 == Model[index].TeamId) }, new SelectListItem { Text = "גרמניה", Value = "25", Selected = (25 == Model[index].TeamId) }, new SelectListItem { Text = "פורטוגל", Value = "26", Selected = (26 == Model[index].TeamId) }, new SelectListItem { Text = "ארהב", Value = "27", Selected = (27 == Model[index].TeamId) }, new SelectListItem { Text = "גאנה", Value = "28", Selected = (28 == Model[index].TeamId) }, new SelectListItem { Text = "בלגיה", Value = "29", Selected = (29 == Model[index].TeamId) }, new SelectListItem { Text = "אלג'יריה", Value = "30", Selected = (30 == Model[index].TeamId) }, new SelectListItem { Text = "רוסיה", Value = "31", Selected = (31 == Model[index].TeamId) }, new SelectListItem { Text = "קוריאה", Value = "32", Selected = (32 == Model[index].TeamId) } })
                        <br /><br />
                    }
                </td>
                <td>
                    @for (var index = 24; index < 28 ; index++)
                    {
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerId", Model[index].GamblerId, new { @readonly = "readonly", @style = "display:none" })
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerName", Model[index].GamblerName, new { @readonly = "readonly", @style = "display:none" })
                        @Html.DropDownList("knockoutGambleViewModels[" + @index + "].TeamId", new[] { new SelectListItem { Text = "ברזיל", Value = "1", Selected = (1 == Model[index].TeamId) }, new SelectListItem { Text = "קרואטיה", Value = "2", Selected = (2 == Model[index].TeamId) }, new SelectListItem { Text = "מקסיקו", Value = "3", Selected = (3 == Model[index].TeamId) }, new SelectListItem { Text = "קמרון", Value = "4", Selected = (4 == Model[index].TeamId) }, new SelectListItem { Text = "ספרד", Value = "5", Selected = (5 == Model[index].TeamId) }, new SelectListItem { Text = "הולנד", Value = "6", Selected = (6 == Model[index].TeamId) }, new SelectListItem { Text = "צ'ילה", Value = "7", Selected = (7 == Model[index].TeamId) }, new SelectListItem { Text = "אוסטרליה", Value = "8", Selected = (8 == Model[index].TeamId) }, new SelectListItem { Text = "קולומביה", Value = "9", Selected = (9 == Model[index].TeamId) }, new SelectListItem { Text = "יוון", Value = "10", Selected = (10 == Model[index].TeamId) }, new SelectListItem { Text = "חוף השנהב", Value = "11", Selected = (11 == Model[index].TeamId) }, new SelectListItem { Text = "יפן", Value = "12", Selected = (12 == Model[index].TeamId) }, new SelectListItem { Text = "אורוגוואי", Value = "13", Selected = (13 == Model[index].TeamId) }, new SelectListItem { Text = "קוסטה ריקה", Value = "14", Selected = (14 == Model[index].TeamId) }, new SelectListItem { Text = "אנגליה", Value = "15", Selected = (15 == Model[index].TeamId) }, new SelectListItem { Text = "איטליה", Value = "16", Selected = (16 == Model[index].TeamId) }, new SelectListItem { Text = "שוויץ", Value = "17", Selected = (17 == Model[index].TeamId) }, new SelectListItem { Text = "אקוודור", Value = "18", Selected = (18 == Model[index].TeamId) }, new SelectListItem { Text = "צרפת", Value = "19", Selected = (19 == Model[index].TeamId) }, new SelectListItem { Text = "הונדורס", Value = "20", Selected = (20 == Model[index].TeamId) }, new SelectListItem { Text = "ארגנטינה", Value = "21", Selected = (21 == Model[index].TeamId) }, new SelectListItem { Text = "בוסניה", Value = "22", Selected = (22 == Model[index].TeamId) }, new SelectListItem { Text = "איראן", Value = "23", Selected = (23 == Model[index].TeamId) }, new SelectListItem { Text = "ניגריה", Value = "24", Selected = (24 == Model[index].TeamId) }, new SelectListItem { Text = "גרמניה", Value = "25", Selected = (25 == Model[index].TeamId) }, new SelectListItem { Text = "פורטוגל", Value = "26", Selected = (26 == Model[index].TeamId) }, new SelectListItem { Text = "ארהב", Value = "27", Selected = (27 == Model[index].TeamId) }, new SelectListItem { Text = "גאנה", Value = "28", Selected = (28 == Model[index].TeamId) }, new SelectListItem { Text = "בלגיה", Value = "29", Selected = (29 == Model[index].TeamId) }, new SelectListItem { Text = "אלג'יריה", Value = "30", Selected = (30 == Model[index].TeamId) }, new SelectListItem { Text = "רוסיה", Value = "31", Selected = (31 == Model[index].TeamId) }, new SelectListItem { Text = "קוריאה", Value = "32", Selected = (32 == Model[index].TeamId) } })
                        <br /><br />
                    }
                </td>
                <td>
                    @for (var index = 28; index < 30; index++)
                    {
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerId", Model[index].GamblerId, new { @readonly = "readonly", @style = "display:none" })
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerName", Model[index].GamblerName, new { @readonly = "readonly", @style = "display:none" })
                        @Html.DropDownList("knockoutGambleViewModels[" + @index + "].TeamId", new[] { new SelectListItem { Text = "ברזיל", Value = "1", Selected = (1 == Model[index].TeamId) }, new SelectListItem { Text = "קרואטיה", Value = "2", Selected = (2 == Model[index].TeamId) }, new SelectListItem { Text = "מקסיקו", Value = "3", Selected = (3 == Model[index].TeamId) }, new SelectListItem { Text = "קמרון", Value = "4", Selected = (4 == Model[index].TeamId) }, new SelectListItem { Text = "ספרד", Value = "5", Selected = (5 == Model[index].TeamId) }, new SelectListItem { Text = "הולנד", Value = "6", Selected = (6 == Model[index].TeamId) }, new SelectListItem { Text = "צ'ילה", Value = "7", Selected = (7 == Model[index].TeamId) }, new SelectListItem { Text = "אוסטרליה", Value = "8", Selected = (8 == Model[index].TeamId) }, new SelectListItem { Text = "קולומביה", Value = "9", Selected = (9 == Model[index].TeamId) }, new SelectListItem { Text = "יוון", Value = "10", Selected = (10 == Model[index].TeamId) }, new SelectListItem { Text = "חוף השנהב", Value = "11", Selected = (11 == Model[index].TeamId) }, new SelectListItem { Text = "יפן", Value = "12", Selected = (12 == Model[index].TeamId) }, new SelectListItem { Text = "אורוגוואי", Value = "13", Selected = (13 == Model[index].TeamId) }, new SelectListItem { Text = "קוסטה ריקה", Value = "14", Selected = (14 == Model[index].TeamId) }, new SelectListItem { Text = "אנגליה", Value = "15", Selected = (15 == Model[index].TeamId) }, new SelectListItem { Text = "איטליה", Value = "16", Selected = (16 == Model[index].TeamId) }, new SelectListItem { Text = "שוויץ", Value = "17", Selected = (17 == Model[index].TeamId) }, new SelectListItem { Text = "אקוודור", Value = "18", Selected = (18 == Model[index].TeamId) }, new SelectListItem { Text = "צרפת", Value = "19", Selected = (19 == Model[index].TeamId) }, new SelectListItem { Text = "הונדורס", Value = "20", Selected = (20 == Model[index].TeamId) }, new SelectListItem { Text = "ארגנטינה", Value = "21", Selected = (21 == Model[index].TeamId) }, new SelectListItem { Text = "בוסניה", Value = "22", Selected = (22 == Model[index].TeamId) }, new SelectListItem { Text = "איראן", Value = "23", Selected = (23 == Model[index].TeamId) }, new SelectListItem { Text = "ניגריה", Value = "24", Selected = (24 == Model[index].TeamId) }, new SelectListItem { Text = "גרמניה", Value = "25", Selected = (25 == Model[index].TeamId) }, new SelectListItem { Text = "פורטוגל", Value = "26", Selected = (26 == Model[index].TeamId) }, new SelectListItem { Text = "ארהב", Value = "27", Selected = (27 == Model[index].TeamId) }, new SelectListItem { Text = "גאנה", Value = "28", Selected = (28 == Model[index].TeamId) }, new SelectListItem { Text = "בלגיה", Value = "29", Selected = (29 == Model[index].TeamId) }, new SelectListItem { Text = "אלג'יריה", Value = "30", Selected = (30 == Model[index].TeamId) }, new SelectListItem { Text = "רוסיה", Value = "31", Selected = (31 == Model[index].TeamId) }, new SelectListItem { Text = "קוריאה", Value = "32", Selected = (32 == Model[index].TeamId) } })
                        <br /><br />
                    }
                </td>
                <td>
                    @for (var index = 30; index < 31; index++)
                    {
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerId", Model[index].GamblerId, new { @readonly = "readonly", @style = "display:none" })
                        @Html.TextBox("knockoutGambleViewModels[" + @index + "].GamblerName", Model[index].GamblerName, new { @readonly = "readonly", @style = "display:none" })
                        @Html.DropDownList("knockoutGambleViewModels[" + @index + "].TeamId", new[] { new SelectListItem { Text = "ברזיל", Value = "1", Selected = (1 == Model[index].TeamId) }, new SelectListItem { Text = "קרואטיה", Value = "2", Selected = (2 == Model[index].TeamId) }, new SelectListItem { Text = "מקסיקו", Value = "3", Selected = (3 == Model[index].TeamId) }, new SelectListItem { Text = "קמרון", Value = "4", Selected = (4 == Model[index].TeamId) }, new SelectListItem { Text = "ספרד", Value = "5", Selected = (5 == Model[index].TeamId) }, new SelectListItem { Text = "הולנד", Value = "6", Selected = (6 == Model[index].TeamId) }, new SelectListItem { Text = "צ'ילה", Value = "7", Selected = (7 == Model[index].TeamId) }, new SelectListItem { Text = "אוסטרליה", Value = "8", Selected = (8 == Model[index].TeamId) }, new SelectListItem { Text = "קולומביה", Value = "9", Selected = (9 == Model[index].TeamId) }, new SelectListItem { Text = "יוון", Value = "10", Selected = (10 == Model[index].TeamId) }, new SelectListItem { Text = "חוף השנהב", Value = "11", Selected = (11 == Model[index].TeamId) }, new SelectListItem { Text = "יפן", Value = "12", Selected = (12 == Model[index].TeamId) }, new SelectListItem { Text = "אורוגוואי", Value = "13", Selected = (13 == Model[index].TeamId) }, new SelectListItem { Text = "קוסטה ריקה", Value = "14", Selected = (14 == Model[index].TeamId) }, new SelectListItem { Text = "אנגליה", Value = "15", Selected = (15 == Model[index].TeamId) }, new SelectListItem { Text = "איטליה", Value = "16", Selected = (16 == Model[index].TeamId) }, new SelectListItem { Text = "שוויץ", Value = "17", Selected = (17 == Model[index].TeamId) }, new SelectListItem { Text = "אקוודור", Value = "18", Selected = (18 == Model[index].TeamId) }, new SelectListItem { Text = "צרפת", Value = "19", Selected = (19 == Model[index].TeamId) }, new SelectListItem { Text = "הונדורס", Value = "20", Selected = (20 == Model[index].TeamId) }, new SelectListItem { Text = "ארגנטינה", Value = "21", Selected = (21 == Model[index].TeamId) }, new SelectListItem { Text = "בוסניה", Value = "22", Selected = (22 == Model[index].TeamId) }, new SelectListItem { Text = "איראן", Value = "23", Selected = (23 == Model[index].TeamId) }, new SelectListItem { Text = "ניגריה", Value = "24", Selected = (24 == Model[index].TeamId) }, new SelectListItem { Text = "גרמניה", Value = "25", Selected = (25 == Model[index].TeamId) }, new SelectListItem { Text = "פורטוגל", Value = "26", Selected = (26 == Model[index].TeamId) }, new SelectListItem { Text = "ארהב", Value = "27", Selected = (27 == Model[index].TeamId) }, new SelectListItem { Text = "גאנה", Value = "28", Selected = (28 == Model[index].TeamId) }, new SelectListItem { Text = "בלגיה", Value = "29", Selected = (29 == Model[index].TeamId) }, new SelectListItem { Text = "אלג'יריה", Value = "30", Selected = (30 == Model[index].TeamId) }, new SelectListItem { Text = "רוסיה", Value = "31", Selected = (31 == Model[index].TeamId) }, new SelectListItem { Text = "קוריאה", Value = "32", Selected = (32 == Model[index].TeamId) } })
                        <br /><br />
                    }
                </td>
            </tr>
        </table>

    </div>
}

<div>
    <br />
    @Html.ActionLink("חזרה לרשימת משתתפים", "Index", "Gamblers")
</div>

@section Scripts 
{
    @Scripts.Render("~/bundles/jqueryval")
}
